#ifndef SKYBOX_H_
#define SKYBOX_H_

#include "DirectXMesh.h"

class SkyBox
{
public:
    SkyBox()
      {
        m_vBuffer[0] = m_vBuffer[1] = m_vBuffer[2] = 
        m_vBuffer[3] = m_vBuffer[4] = m_vBuffer[5] = NULL;
        m_texture[0] = m_texture[1] = m_texture[2] = 
        m_texture[3] = m_texture[4] = m_texture[5] = NULL;
        m_scale[0] = m_scale[1] = m_scale[2] = 0;
        m_pos[0] = m_pos[1] = m_pos[2] = 0;
        m_numVerts = 0;
      }
    void InitializeBox( int scaleX,int scaleY,int scaleZ,
                        float posX,  float posY,  float posZ);
    void InitializeDome(float posX, float posY, float posZ, int radius);
    void ShutDown();
    void SetTextures(   LPDIRECT3DTEXTURE9 floor, 
                        LPDIRECT3DTEXTURE9 top, 
                        LPDIRECT3DTEXTURE9 side0, 
                        LPDIRECT3DTEXTURE9 side1, 
                        LPDIRECT3DTEXTURE9 side2, 
                        LPDIRECT3DTEXTURE9 side3 );
    void Render(ID3DXEffect* effect);
private:
    void GenerateSide(  LPDIRECT3DVERTEXBUFFER9 buffer, CustomVertex& start,
                        CustomVertex& finish, float x_mul,float y_mul,float z_mul, int winding);
    void CreateFloor();
    void CreateRoof();
    void CreateSide0();
    void CreateSide1();
    void CreateSide2();
    void CreateSide3();
    LPDIRECT3DVERTEXBUFFER9 m_vBuffer[6];
    LPDIRECT3DTEXTURE9 m_texture[6];
    int m_scale[3];
    float m_pos[3];
    int m_numVerts;
};

#endif